package com.android.fragmentdemo.fragments
import androidx.lifecycle.ViewModelProvider
import android.os.Bundle
import android.util.Log
import android.view.View
import com.android.fragmentdemo.R
import com.hengfoxwolf.commonbase.base.BaseFragment
import com.android.fragmentdemo.databinding.FragmentCollectBinding

class CollectFragment : BaseFragment<FragmentCollectBinding>() {

    private lateinit var viewModel: CollectViewModel

    override fun getLayoutId() = R.layout.fragment_collect

    override fun init(savedInstanceState: Bundle?) {


    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        viewModel = ViewModelProvider(this)[CollectViewModel::class.java]
    }

    override fun onHiddenChanged(hidden: Boolean) {
        super.onHiddenChanged(hidden)
        Log.d(TAG, "222->${TAG}--${hidden}")
    }

    companion object {
        private const val TAG = "CollectFragment"
        fun newInstance() = CollectFragment()
    }
}